<include file="Public:head" xmlns:H="http://www.w3.org/1999/xhtml"/>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>买手审核</h5>
            <div class="ibox-tools" style="margin-top: -9px;">
                <a href="javascript:history.go(-1);" class="btn btn-primary"><i class="fa fa-arrow-left"></i> 返回</a>
            </div>
        </div>
        <div class="ibox-content">

            <form action="" method="post" enctype="multipart/form-data" id="brandForm" class="form-horizontal">
                <input type="hidden" name="id" value="{$da.id}">
                <input type="hidden" name="uid" value="{$da.user_id}">
                <div class="form-group">
                    <label class="col-sm-2 control-label">用户名</label>
                    <div class="col-sm-6">
                        <input type="text" name="name" id="name" value="{$da.name}" class="form-control" placeholder="买手名称" disabled>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">身份证号</label>
                    <div class="col-sm-6">
                        <input type="text" name="id_card" id="id_card" value="{$da.id_card}" class="form-control" placeholder="身份证号" disabled>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">电话号码</label>
                    <div class="col-sm-6">
                        <input type="text" name="mobile" id="mobile" value="{$da.mobile}" class="form-control" placeholder="电话号码" disabled>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">审核</label>
                    <div class="col-sm-6">
                        <label class="checkbox-inline">
                            <input type="radio" name="status"  value="0" <if condition="$da.status=='0'"> checked="checked"</if>>待审核
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="status"  value="1" <if condition="$da.status=='1'"> checked="checked"</if>>审核通过
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="status"  value="-1" <if condition="$da.status=='-1'"> checked="checked"</if>>审核不通过
                        </label>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <!--<button class="btn btn-primary" type="submit">提交</button>-->
                        <!--href="JavaScript:void(0);" onclick="roleSubmit();"-->
                        <a href="JavaScript:void(0);" onclick="Submit();" class="btn btn-primary" id="submit">提交</a>
                    </div>
                </div>
            </form>


        </div>
    </div>
    <!-- End Panel Basic -->
</div>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '#time' //指定元素
        ,type:'datetime'
    });
    function Submit(){
        var id = $('input[name="id"]').val();
        var uid = $('input[name="uid"]').val();
        var name = $('input[name="name"]').val();
        var mobile = $('input[name="mobile"]').val();
        var status = $('input[name="status"]:checked').val();

        $.post("{:url('Member/checkbuyer')}",{
            id:id,uid:uid, name:name,mobile:mobile,status:status
        },function(result){
            if(result.code == '0'){
                parent.layer.msg(result.msg,{
                    shade:false,
                    icon:2,
                });
            }else{
                parent.layer.msg(result.msg,{
                            icon:1,
                            time:1000,
                        },
                        function (index, item) {
                            location.href = result.url;
                        });
            }
        });

    };
</script>

</body>

</html>